<template>
    <van-nav-bar title="标题" left-text="返回" left-arrow @click-left="onClickLeft" />
    <van-swipe :autoplay="3000" lazy-render>
        <van-swipe-item v-for="image in images" :key="image">
            <img style="width: 100%;height: 150px;" :src="image" />
        </van-swipe-item>
    </van-swipe>
    <van-grid :border="false" :column-num="3">
        <van-grid-item>
            <van-image src="https://fastly.jsdelivr.net/npm/@vant/assets/apple-1.jpeg" />
        </van-grid-item>
        <van-grid-item>
            <van-image src="https://fastly.jsdelivr.net/npm/@vant/assets/apple-2.jpeg" />
        </van-grid-item>
        <van-grid-item>
            <van-image src="https://fastly.jsdelivr.net/npm/@vant/assets/apple-3.jpeg" />
        </van-grid-item>
    </van-grid>
</template>

<script setup>
import { useRouter } from 'vue-router';
let router=useRouter()
const images = [
    'https://fastly.jsdelivr.net/npm/@vant/assets/apple-1.jpeg',
    'https://fastly.jsdelivr.net/npm/@vant/assets/apple-2.jpeg',
];
 const onClickLeft = () => router.go(-1);
</script>

<style lang="scss" scoped>
.my-swipe .van-swipe-item {
    color: #fff;
    font-size: 20px;
    line-height: 150px;
    text-align: center;
    background-color: #39a9ed;
}
</style>
